import {ref, onUnmounted} from 'vue'

export const useTimeout = (callback, time) => {
	let t = setTimeout(callback,time)
	
	const close = () => {
		clearTimeout(t)
	}
	onUnmounted(close)	
	return {
		close
	}
}
